<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/commons/taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<%@ include file="/commons/meta.jsp" %>
	
	<style type="text/css">

		#loginDiv {width: 600px;margin: 10px auto;border:solid 1px #ddd;}
		
		#loginDiv div {margin: 20px 20px 20px 20px;vertical-align: middle;text-align: left}
		
		#loginDiv div label {margin: 0px 40px 0px 20px;height: 26px;line-height: 26px;vertical-align: middle;text-align: right;}
		#loginDiv div span {margin: 0px 0px 0px 120px;vertical-align: middle;;text-align: right;}
		.validation-advice {
			
			color : #FF3300;
			font-weight: bold;
			display: inline;
		}
		
	</style>
	<script type="text/javascript">
		function refreshImage(){
		    document.getElementById("codeImage").src="${ctx}/front/image.jsp?rand ="+Math.random();
		}
		
		function doCheckUser()
		{
			var json ={};
			$.ajax(
				{url:"${ctx}/pages/OrderDetail/delete.do",
				data:json,
				success:function responseData(msg){
					var trObj = obj.parentNode.parentNode;
					trObj.parentNode.removeChild(trObj);
					alert(msg);
				}
				}
			);
		}
	</script>
</head>
<body>
  	<div id="sub-header" class="twidth">
  	<div id="navsub">
		<div class="l"></div>
		<div class="r"></div>
		<div class="m">
		<div style="width:600px;float:left;">
			<a href="${ctx}/">首页</a> → <a href="${ctx}/Register/indexMembers.do">注册新会员</a>
		</div>
		</div>
	</div>
	
	<div class="twidth" style="margin-top:0px;min-height: 500px;_height:500px;">
    <div class="mframe mR" style="width:100%;color: #333;text-align: center">
	  	<s:form action="/Register/register.do" method="post" theme="simple">
	  	<div id="loginDiv" >
	  		<div style="margin: 20px 0px 40px 20px;font-size: 14px;font-weight: bold;text-align: left">
	  			注册找工人网会员，享受便捷的找工人服务
	  			<input type="hidden" id="type" name="type" value="1"/>
	  			<%@ include file="/commons/messages.jsp" %>
	  		</div>
	  		
	  		<div>
	  			<label for="loginName">登&nbsp;&nbsp;录&nbsp;名：</label><s:textfield name="loginName" id="loginName" value="%{model.loginName}"  maxLength="20"  cssStyle="width:200px;" 
				cssClass="required min-length-3 max-length-20  validate-username validate-ajax-checkUserName.do" 
				required="true" />
				<br /><span>不超过20个字符（数字、字母和下划线），一旦注册成功用户名不能修改</span>
	  		</div>
	  		
	  		<div>
	  			<label>密&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;码：</label><s:password name="password" id="password" value="%{model.password}" cssStyle="width:200px;" maxLength="20"
				 cssClass="required min-length-6 max-length-20" required="true" /> 
				 <br /><span>6-20个字符（数字，字母和下划线的组合；字母区分大小写）</span>
				 
	  		</div>
	  		<div>
	  			<label>确认密码：</label><s:password name="confirePassword" id="confirePassword" cssClass="required equals-password "  cssStyle="width:200px;"  
	  			maxLength="20" required="true" title="两次输入密码不一致" />
	  		</div>
	  		
	  		<div>
	  			<label>电子邮件：</label><s:textfield name="email" id="email" value="%{model.email}" cssClass="required validate-email validate-ajax-checkEmail.do" 
	  			cssStyle="width:200px" required="true"  />
	  			<br /><span>请输入有效的电子邮箱,例如：myname@126.com</span>
	  			
	  		</div>
	  		<div>
	  			<label>验&nbsp;&nbsp;证&nbsp;码：</label><s:textfield id="imageCode" name="imageCode" cssClass="required validate-ajax-checkImageCode.do" required="true" />
	  			<br /><span>输入下图中的字符，不区分大小写</span>
	  			 
	  		</div>
	  		
	  		<div>
	  			<label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label><img id="codeImage" src="${ctx}/front/image.jsp"/><a href="JavaScript:refreshImage();" onfocus="this.blur();">看不清，换一个</a>
	  		</div>
	  		
	  		<div style="margin-left: 140px">
	  			<input type="checkbox" name="agree" id="agree" checked style="vertical-align: middle;margin-left: 20px" />
	  			<label for="agree" style="vertical-align: middle;margin: 0px">同意找工人网协议</label>
	  		</div>
	  		
	  		<div style="margin-left: 140px">
	  			<input id="submitButton" name="submitButton" type="submit" style="width:140px;height: 26px;" value="同意条款提交注册" />
	  		</div>
	  		
	  	</div>
	  	
	</s:form>
    </div>
    
    <!-- 
    <div class="lframe" style="float:left;width:228px;">
	<div class="tl"></div>
	<div class="tr"></div>
	<div class="tm">
		<span class="tt">注册须知</span>
	</div>
	<div class="wrapper">
	<div class="ml"></div>
	<div class="mr"></div>
	<div class="mm">
		<ul class="nl">
			
		</ul>
	</div>
	</div>
	<div class="bl"></div>
	<div class="br"></div>
	<div class="bm"></div>
	</div> -->
	
  	</div>
  	<jsp:include page="/commons/bottom.html"  flush="true"></jsp:include>
  	</div>
<script>
	
	new Validation(document.forms[0],{onSubmit:true,onFormValidate : function(result,form) {
		var finalResult = result;
		//在这里添加自定义验证
		return disableSubmit(finalResult,'submitButton');
	}});
	
	
	 $("#password").blur(function(){   
           var pwd = $("#password").val();
           if(pwd.length<6){
           	//alert("sdfasdfad");
           }  
       }) 
	
</script>
</body>

<script>
  	//document.getElementById("indexPage").className="thisclass";
  </script>
</html>